CREATE EXTERNAL TABLE jms_dwd.dwd_lgn_log_record_dt(
id string
,userId  string     comment'用户id'
,userCode string    comment '用户编码'
,userName string    comment '用户名称'
,networkId string   comment '所属网点id'
,networkCode string comment '所属网点code'
,networkName string comment '所属网点名称'
,loginType string    comment '登录端(1:WEB、2:PC、3:APP)'
,appType string      comment'应用类型(1:JMS、2:JMS-PC、3:内场APP、4:外场APP、5:站点APP、6:JMS-APP)'
,loginTime string    comment'登录时间'
,loginStatus string  comment'登录状态 fail success'
,ip string           comment'登录ip'
,ipCity string       comment'登录ipCity'
,mac              string   comment'mac地址'
,remark           string   comment'创建时间'
,createTime       string    comment'事务id'
,traceId          string   comment'APP设备ID'
,appDeviceId      string   comment'登录方式'
,loginWay         string   comment'部门'
,dept             string   comment'岗位'
,post             string   comment'登录地址'
,loginAddr        string    comment'app版本号'
,appVersion       string    comment'app设备型号'
,appPlatform      string     comment'app设备系统'
,deviceVersion    string   comment'类型'
,remote           string   comment'类型'
,franchiseeId     string  comment'加盟商ID'
,franchiseeCode   string  comment'加盟商CODE'
,franchiseeName   string  comment'加盟商名称'
,proxyNetworkId   string   comment'代理区ID'
,proxyNetworkCode string   comment'代理区CODE'
,proxyNetworkName string   comment'代理区名称')
COMMENT '登录日志表'
PARTITIONED BY (
  `dt` string COMMENT '创建日期 (yyyy-MM-dd)')
stored as parquet
location '/dw/hive/jms_dwd.db/external/dwd_lgn_log_record_dt'